package com.foreverwin.mes.production.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.foreverwin.mes.production.dto.SfcInWorkDto;
import com.foreverwin.mes.production.dto.SfcQueuedDto;
import com.foreverwin.mes.production.dto.SfcSoDispRelDto;
import com.foreverwin.mes.production.model.SfcExtend;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: mesext
 * @description: 生产过站
 * @author: syngna
 * @create: 2020-02-17 11:19
 */
@Repository
public interface SfcExMapper extends BaseMapper<SfcExtend> {

    List<SfcQueuedDto> selectReleasableSfc(@Param("site") String site, @Param("resrce") String resrce);

    List<SfcQueuedDto> selectQueuedOrReleasableSfc(@Param("site") String site, @Param("resrce") String resrce, @Param("operation") String operation);

    List<SfcInWorkDto> selectSfcInWork(@Param("site") String site, @Param("locale") String locale, @Param("resrce") String resrce, @Param("operation") String operation, @Param("sfc") String sfc);

    List<SfcSoDispRelDto> selectTaskNoBySfc(@Param("site") String site, @Param("sfc") String sfc);

    void closeTask(@Param("site") String site, @Param("taskNo") String taskNo);
}